package com.kitchen.ui.controls
{
	import com.kitchen.ui.controls.account.CoinBar;
	import com.kitchen.ui.controls.account.ExpBar;
	import com.kitchen.ui.controls.account.HeadBar;
	import com.kitchen.ui.controls.account.IMoneyBar;
	import com.kitchen.ui.controls.account.WareHouseBar;
	
	import flash.display.BitmapData;
	import flash.display.Sprite;

	public class AccountBar extends Sprite
	{
		private var shop:Object;
		private var shoper:Object;
		private var shops:Array;
		private var mainSkin:BitmapData;
		
		public function AccountBar(main:BitmapData, shoper:Object, shops:Array, shop:Object)
		{
			super();
			this.mainSkin = main;
			this.shop = shop;
			this.shoper = shoper;
			this.shops = shops;
			this.layout();
		}
		
		private function layout():void{
			var header:HeadBar = new HeadBar(this.mainSkin, this.shoper, this.shops, this.shop);
			var coin:CoinBar = new CoinBar(this.mainSkin, this.shoper);
			var imoney:IMoneyBar = new IMoneyBar(this.mainSkin, this.shop);
			var exp:ExpBar = new ExpBar(this.mainSkin, this.shop);
			var ware:WareHouseBar = new WareHouseBar(this.mainSkin, this.shop);
			header.y = 0;
			coin.y = imoney.y = exp.y = 2;
			header.x = 0;
			coin.x = 233;
			imoney.x = 352;
			exp.x = 480;
			ware.x = 602;
			this.addChild(header);
			this.addChild(coin);
			this.addChild(imoney);
			this.addChild(exp);
			this.addChild(ware);
		}
		
	}
}